<h1>phf-snakes</h1>
<p>Copyright (c) 2004-2011 Vladimir Chalupecky<br />
<a href="http://phf-snakes.googlecode.com/">http://phf-snakes.googlecode.com/</a></p>
<hr />
<h2>Introduction</h2>
<p>This small program is a parallel C++ implementation of the image segmentation
algorithm described in the paper <a href="http://dx.doi.org/10.1016/j.apnum.2004.05.001">M. Benes, V. Chalupecky, and K. Mikula,
Geometrical image segmentation by the Allen-Cahn equation, Applied Numerical
Mathematics, 51 (2004), pp. 187—205</a>.
The parallelization is done via SPMD style OpenMP. The image is split into
blocks and each thread is responsible for updating its block. The Gauss-Seidel
solver uses a simple red-black ordering in the y-direction where all the threads
first update even rows and then odd rows of the image. The program reads and
writes images in PNG format.</p>
<h2>Compilation</h2>
<p><code>phf-snakes</code> has only a couple of dependencies. These are:</p>
<ul>
<li>boost (multi_array, exception)</li>
<li>libpng and zlib</li>
<li>OpenMP-capable C++ compiler</li>
<li>CMake</li>
</ul>
<p>To compile it, use the following commands:</p>
<pre><code>$ mkdir build
$ cd build
$ cmake -DCMAKE_BUILD_TYPE=Release path/to/source/directory
$ make
$ ./phf-snakes
</code></pre>
<h2>Usage</h2>
<p>Change parameters by editing <code>phf-snakes.dat</code>. Some test images are available in
the <code>images</code> directory. Note that for each image the program needs the
corresponding outer or inner contour image file, depending on the sign of F. See
the source code and the article for details.</p>